﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                   assembly="DataStore"
                   namespace="DataStore.Domain">
  <class name="Link" table="Link">
    <id name="Id" column="LinkId" type="Guid">
      <generator class="guid" />
    </id>
    <discriminator column="LinkType" type="String" />
    <property name="Uri" type="DataStore.Domain.NHibExtensions.UriUserType, DataStore" />
    <property name="Description" type="String" />
    <property name="Location" />

    <subclass name="WebPageLink" discriminator-value="WebPage">
    </subclass>

    <subclass name="SoundLink" discriminator-value="Sound">
    </subclass>

    <subclass name="ImageLink" discriminator-value="Image">
    </subclass>

    <subclass name="DocumentLink" discriminator-value="Document">
    </subclass>
    
    <subclass name="EmailLink" discriminator-value="Email">
    </subclass>

    <subclass name="PhoneLink" discriminator-value="Phone">
    </subclass>
  </class>
</hibernate-mapping>
